package myzf.cloud;

import cn.myzf.module.instance.InstanceInfo;
import org.springframework.context.ApplicationEvent;

/**
 * @package myzf.cloud
 * @Date Created in 2020/3/8 20:07
 * @Author myzf
 */
public class InstanceRegisterEvent extends ApplicationEvent {

    private InstanceInfo instanceInfo;

    private int timeLimit;

    private boolean isSync;


    public InstanceRegisterEvent(Object source, InstanceInfo info,int timeLimit,boolean isSync) {
        super(source);
        this.instanceInfo = info;
        this.timeLimit = timeLimit;
        this.isSync = isSync;
    }

    public InstanceInfo getInstanceInfo() {
        return instanceInfo;
    }

    public void setInstanceInfo(InstanceInfo instanceInfo) {
        this.instanceInfo = instanceInfo;
    }

    public int getTimeLimit() {
        return timeLimit;
    }

    public void setTimeLimit(int timeLimit) {
        this.timeLimit = timeLimit;
    }

    public boolean isSync() {
        return isSync;
    }

    public void setSync(boolean sync) {
        isSync = sync;
    }
}
